﻿<r:RibbonWindow 
    x:Class="Southridge.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Southridge" 
    xmlns:dg="http://schemas.microsoft.com/wpf/2008/toolkit" 
    xmlns:r="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"        
    xmlns:diag="clr-namespace:System.Diagnostics;assembly=WindowsBase"
    xmlns:biz="clr-namespace:Southridge.Business;assembly=Southridge.Business"
    xmlns:view="clr-namespace:Southridge.View"
    xmlns:ugly="clr-namespace:Southridge.WorkArounds"    
    Background="#2E3740"
    Width="1000"
    Height="700"
    Title="Southridge Realty"     
    Name="MainWindow">

  <r:RibbonWindow.Resources>
        <ResourceDictionary>


				<!--
    =========================================================================
    OFFICE SKIN
    =========================================================================
    -->
    
        <ResourceDictionary.MergedDictionaries>
            <!--<ResourceDictionary Source="/RibbonControlsLibrary;component/Themes/Office2007Blue.xaml" />-->
        </ResourceDictionary.MergedDictionaries>



            <Storyboard x:Key="ModalOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MainWindow" Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.2"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="ModalOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MainWindow" Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.0010000" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            
            
            <!-- DataTemplates -->

		<DataTemplate x:Key="SimpleMenuItemTemplate" >			 
			<TextBlock Text="{Binding}" Foreground="Black" />
		</DataTemplate>

            <ControlTemplate x:Key="HorribleWorkaround" TargetType="{x:Type MenuItem}">
                <Grid Background="Transparent">
                    <ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True" />
                </Grid>
            </ControlTemplate>
            
            
	
	<!-- Ribbon Commands -->
      <view:NonRoutedRibbonCommandDelegator 
          x:Key="ApplicationButton"
          LabelTitle="Application Button"
          LabelDescription="Close the application."
          LargeImageSource="Images\ApplicationMenuIcon.png"
          ToolTipTitle="Southridge Realty"
          ToolTipDescription="Click here to open or save a client profile, or to access a profile that has been saved online."
          ToolTipImageSource="Images\ApplicationMenuIcon.png"
          ToolTipFooterTitle="Visit www.southridgerealty.com for more information."/>


            <view:NonRoutedRibbonCommandDelegator 
              x:Key="NewProfileCommand"              
              LabelTitle="New Profile"
              ToolTipDescription="Create a new client profile."
              ToolTipTitle="New Profile"
              SmallImageSource="{StaticResource NewProfileIconDark}"
              LargeImageSource="{StaticResource NewProfileIconDark}"       
                />
            
                     
    <view:NonRoutedRibbonCommandDelegator 
      x:Key="OpenCommand"     
      LabelTitle="Open Profile"
      LabelDescription="Open a client profile"
      ToolTipDescription="Load a client profile from your disk."
      ToolTipTitle="Open Profile"
      SmallImageSource="{StaticResource OpenIconDark}"
      LargeImageSource="{StaticResource OpenIconDark}" />
            
    <view:NonRoutedRibbonCommandDelegator 
      x:Key="PrintCommand"    
      LabelTitle="Print Profile"
      ToolTipDescription="Print the current client profile."
      ToolTipTitle="Print Profile"
      SmallImageSource="{StaticResource PrintIconDark}"
      LargeImageSource="{StaticResource PrintIconDark}" 
      ActualCommand="{Binding NotImplementedEnabledCommand}"/>
    <view:NonRoutedRibbonCommandDelegator
      x:Key="SaveOnlineCommand"       
      LabelTitle="Save Online"
      ToolTipDescription="Save the current client profile so that it is accessible online."
      ToolTipTitle="Save Profile Online"
      SmallImageSource="{StaticResource SaveOnlineIconDark}"
      LargeImageSource="{StaticResource SaveOnlineIconDark}" />
    <view:NonRoutedRibbonCommandDelegator
      x:Key="OpenOnlineCommand"    
      LabelTitle="Open Online"
      ToolTipDescription="Open a client profile from an online location."
      ToolTipTitle="Open Online Profile"
      SmallImageSource="{StaticResource OpenOnlineIconDark}"
      LargeImageSource="{StaticResource OpenOnlineIconDark}" />
   
  
    <!-- Quick -->        
    <view:NonRoutedRibbonCommandDelegator
      x:Key="ContactClientCommand"      
      LabelTitle="Contact Client"
      LabelDescription="Contact the client via phone or email"
      ToolTipDescription="View options to contact the client."
      ToolTipTitle="Contact Client"
      SmallImageSource="{StaticResource FullNameIconDark}"
      LargeImageSource="{StaticResource FullNameIconDark}" />
    <view:NonRoutedRibbonCommandDelegator
      x:Key="ContactInfoCommand"       
      LabelTitle="Client Contact Info"
      ToolTipDescription="View the client's contact information."
      ToolTipTitle="Client's Contact Info"
      SmallImageSource="{StaticResource FullNameIconDark}"
      LargeImageSource="{StaticResource FullNameIconDark}" />
    <view:NonRoutedRibbonCommandDelegator
      x:Key="Phone1Command"       
      LabelTitle="Dial Phone #1"
      ToolTipDescription="Dial the client's primary phone number."
      ToolTipTitle="Primary Phone"
      SmallImageSource="{StaticResource PhoneIconDark}"
      LargeImageSource="{StaticResource PhoneIconDark}" />
    <view:NonRoutedRibbonCommandDelegator
      x:Key="Phone2Command"       
      LabelTitle="Dial Phone #2"
      ToolTipDescription="Dial the client's secondary phone number."
      ToolTipTitle="Secondary Phone"
      SmallImageSource="{StaticResource PhoneIconDark}"
      LargeImageSource="{StaticResource PhoneIconDark}" />
    <view:NonRoutedRibbonCommandDelegator
      x:Key="EmailCommand" 
      LabelTitle="Send Email"
      ToolTipDescription="Send an email to the client's primary email address."
      ToolTipTitle="Email Address"
      SmallImageSource="{StaticResource EmailIconDark}"
      LargeImageSource="{StaticResource EmailIconDark}" />
            
    
    
   

	<!--
    =========================================================================
    LOCAL RESOURCES
    =========================================================================
    -->

    <!-- Data -->
    
     
    <!-- ## Data Converters -->
	    <!-- are in App.xaml --> 
    <!-- ##Brushes -->

    <LinearGradientBrush x:Key="Brush_DataGridDotFill" StartPoint="0,0" EndPoint="0,1">
      <GradientStop Color="#66AEEF" Offset="0"/>
      <GradientStop Color="#2B6AB3" Offset="1"/>
    </LinearGradientBrush>

    <DropShadowEffect x:Key="Effect_DotDropShadowEffect" BlurRadius="1.5" ShadowDepth=".5" Direction="-90" Opacity="0.5" />


	<!-- ##Styles -->
	 
	<Style x:Key="{x:Type MenuItem}" TargetType="{x:Type MenuItem}">
		<Setter Property="Foreground" Value="Black" />
	</Style>

		</ResourceDictionary>
  </r:RibbonWindow.Resources>

  <Grid SnapsToDevicePixels="True" >
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
      <RowDefinition Height="*" />
    </Grid.RowDefinitions>

    <!-- Ribbon -->

    <r:Ribbon x:Name="ribbon" >
            <r:Ribbon.Title>
                <MultiBinding Converter="{StaticResource ProfileToTitleConverter}" >
                    <Binding Path="CurrentProfile.FirstName" />
                    <Binding Path="CurrentProfile.LastName" />
                </MultiBinding>
            </r:Ribbon.Title>
            <r:Ribbon.Resources>
                <view:DataContextSpy x:Key="spy" />

                <DataTemplate x:Key="RecentMenuItemTemplate" >
                    <MenuItem Template="{StaticResource HorribleWorkaround}" 
                        Command="{Binding Source={StaticResource spy}, Path=DataContext.OpenProfile}" 
                        CommandParameter="{Binding}">
                        <TextBlock Text="{Binding Name}" />
                    </MenuItem>
                </DataTemplate>

                <view:NonRoutedRibbonCommandDelegator 
                      x:Key="NewProfileCommand"              
                      LabelTitle="New Profile"
                      ToolTipDescription="Create a new client profile."
                      ToolTipTitle="New Profile"
                      SmallImageSource="{StaticResource NewProfileIconDark}"
                      LargeImageSource="{StaticResource NewProfileIconDark}" 
                      ActualCommand="{Binding Source={StaticResource spy}, Path=DataContext.NewProfile}" 
                />
                
                
                <view:NonRoutedRibbonCommandDelegator2                      
      x:Key="SaveCommand"      
      LabelTitle="Save Profile"
      LabelDescription="Save the client's profile"
      ToolTipDescription="Save the current client profile to your disk."
      ToolTipTitle="Save Profile"
      SmallImageSource="{StaticResource SaveIconDark}"
      LargeImageSource="{StaticResource SaveIconDark}" 
      ActualCommand="{Binding Source={StaticResource spy}, Path=DataContext.SaveProfile}"  />
                
                
                <view:NonRoutedRibbonCommandDelegator 
                    ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.ShowColumnCommand}"
                    x:Key="ViewPriceColumn"
                    LabelTitle="Price"
                    ToolTipDescription="Toggle visibility of the Price column."
                    ToolTipTitle="View Price Column" />

      <view:NonRoutedRibbonCommandDelegator 
        ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.ShowColumnCommand}" 
        x:Key="ViewPhotoColumn"
        LabelTitle="Photo"
        ToolTipDescription="Toggle visibility of the Photo column."
        ToolTipTitle="View Photo Column" />

      <view:NonRoutedRibbonCommandDelegator 
        ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.ShowColumnCommand}" 
        x:Key="ViewTitleColumn"       
        LabelTitle="Title"
        ToolTipTitle="View Title Column" />
      <view:NonRoutedRibbonCommandDelegator 
        ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.ShowColumnCommand}" 
        x:Key="ViewBathroomsColumn"
        LabelTitle="Bathrooms"
        ToolTipDescription="Toggle visibility of the Bathrooms column."
        ToolTipTitle="View Bathrooms Column" />
      <view:NonRoutedRibbonCommandDelegator 
        ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.ShowColumnCommand}" 
        x:Key="ViewBedroomsColumn"
        LabelTitle="Bedrooms"
        ToolTipDescription="Toggle visibility of the Bedrooms column."
        ToolTipTitle="View Bedrooms Column" />
      <view:NonRoutedRibbonCommandDelegator 
        ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.ShowColumnCommand}"
        x:Key="ViewYearColumn"
        LabelTitle="Year"
        ToolTipDescription="Toggle visibility of the Year column."
        ToolTipTitle="View Year Column" />
      <view:NonRoutedRibbonCommandDelegator 
        ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.ShowColumnCommand}" 
        x:Key="ViewSqrFootageColumn"
        LabelTitle="Sqr. Footage"
        ToolTipDescription="Toggle visibility of the Sqr. Footage column."
        ToolTipTitle="View Sqr. Footage Column" />
      <view:NonRoutedRibbonCommandDelegator 
        ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.ShowColumnCommand}"
        x:Key="ViewAppointmentColumn"
        LabelTitle="Appointment"
        ToolTipDescription="Toggle visibility of the Appointment column."
        ToolTipTitle="View Appointment Column" />
      <view:NonRoutedRibbonCommandDelegator 
        ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.ShowColumnCommand}" 
        x:Key="ViewAddressColumn"
        LabelTitle="Address"
        ToolTipDescription="Toggle visibility of the Address column."
        ToolTipTitle="View Address Column" />
      <view:NonRoutedRibbonCommandDelegator 
        ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.ShowColumnCommand}" 
        x:Key="ViewRatingColumn"
        LabelTitle="Rating"
        ToolTipDescription="Toggle visibility of the Rating column."
        ToolTipTitle="View Rating Column" />
      <view:NonRoutedRibbonCommandDelegator 
        ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.ShowColumnCommand}" 
        x:Key="ViewDateUpdatedColumn"
        LabelTitle="Date Updated"
        ToolTipDescription="Toggle visibility of the Date Updated column."
        ToolTipTitle="View Date Updated Column" />
      <view:NonRoutedRibbonCommandDelegator 
                    ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.ShowColumnCommand}"
      x:Key="ViewDateListedColumn"
      LabelTitle="Date Listed"
      ToolTipDescription="Toggle visibility of the Date Listed column."
      ToolTipTitle="View Date Listed Column" />

                <!-- Details -->
    <view:NonRoutedRibbonCommandDelegator
      x:Key="ViewListCommand"     
      LabelTitle="List"
      ToolTipDescription="View the search results as a list."
      ToolTipTitle="List"
      SmallImageSource="{StaticResource ViewListIconDark}"
      LargeImageSource="{StaticResource ViewListIconDark}" 
      ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.DetailsCommand}"/>
    <view:NonRoutedRibbonCommandDelegator        
      x:Key="ViewMapCommand"       
      LabelTitle="Map"
      ToolTipDescription="View the search results on a map."
      ToolTipTitle="Map"
      SmallImageSource="{StaticResource ViewMapIconDark}"
      LargeImageSource="{StaticResource ViewMapIconDark}" 
      ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.OpenMap}"
        />
    <view:NonRoutedRibbonCommandDelegator
      x:Key="ViewDetailsCommand"
       LabelTitle="Details"
      ToolTipDescription="View details for the search results."
      ToolTipTitle="Details"
      SmallImageSource="{StaticResource ViewDetailsIconDark}"
      LargeImageSource="{StaticResource ViewDetailsIconDark}" 
      ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.DetailsCommand}"/>

                <!-- Map-->
                <view:NonRoutedRibbonCommandDelegator
      x:Key="ZoomInCommand"      
      LabelTitle="Zoom In"
      ToolTipDescription="Zoom in on the map."
      ToolTipTitle="Zoom In"
      SmallImageSource="{StaticResource ViewMapIconDark}"
      LargeImageSource="{StaticResource ViewMapIconDark}" 
      ToolTipImageSource="{StaticResource ViewMapIconDark}" /> 
                <!--ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.MapCommand}" -->
                <view:NonRoutedRibbonCommandDelegator
      x:Key="ZoomOutCommand"      
      LabelTitle="Zoom Out"
      ToolTipDescription="Zoom out on the map."
      ToolTipTitle="Zoom Out"
      SmallImageSource="{StaticResource ViewMapIconDark}"
      LargeImageSource="{StaticResource ViewMapIconDark}" 
      ToolTipImageSource="{StaticResource ViewMapIconDark}" /> 
                <!--ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.MapCommand}"-->
    <view:NonRoutedRibbonCommandDelegator
      x:Key="CopyPhotoCommand" 
      LabelTitle="Copy Photo"
      ToolTipDescription="Place the primary image from the selected listing on the clipboard."
      ToolTipTitle="Copy Listing Photo"
      SmallImageSource="{StaticResource CopyPhotoIconDark}"
      LargeImageSource="{StaticResource CopyPhotoIconDark}" />
                <view:NonRoutedRibbonCommandDelegator
      x:Key="CopyListingCommand"       
      LabelTitle="Copy Listing"
      ToolTipDescription="Place the selected listing on the clipboard."
      ToolTipTitle="Copy Listing"
      SmallImageSource="{StaticResource CopyListingIconDark}"
      LargeImageSource="{StaticResource CopyListingIconDark}" />

                <!-- SearchWindow -->
    <view:NonRoutedRibbonCommandDelegator
      x:Key="TimeFrameCommand"       
      LabelTitle="Timeframe"
      ToolTipDescription="Enter the timeframe in which the client is expected to move."
      ToolTipTitle="Moving Timeframe"
      SmallImageSource="{StaticResource TimeframeIconDark}"
      LargeImageSource="{StaticResource TimeframeIconDark}" 
      ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.SearchResultsCommand}"/>
    <view:NonRoutedRibbonCommandDelegator
      x:Key="LocalMoveCommand"       
      LabelTitle="Local Move"
      ToolTipDescription="Indicate whether this is a local move or a relocation."
      ToolTipTitle="Local Move"
      SmallImageSource="{StaticResource LocalMoveIconDark}"
      LargeImageSource="{StaticResource LocalMoveIconDark}" 
      ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.SearchResultsCommand}"/>
    <view:NonRoutedRibbonCommandDelegator
      x:Key="ChildrenCommand"           
      LabelTitle="Children"
      ToolTipDescription="Inidcate whether the client will have children living in the home location."
      ToolTipTitle="Children"
      SmallImageSource="{StaticResource ChildrenIconDark}"
      LargeImageSource="{StaticResource ChildrenIconDark}" 
      ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.SearchResultsCommand}"/>
    <view:NonRoutedRibbonCommandDelegator
      x:Key="FirstTimeBuyerCommand"       
      LabelTitle="First Time"
      ToolTipDescription="Indicate whether the client is a first time buyer."
      ToolTipTitle="First Time Buyer"
      SmallImageSource="{StaticResource FirstTimeIconDark}"
      LargeImageSource="{StaticResource FirstTimeIconDark}" 
      ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.SearchResultsCommand}"/>
    <view:NonRoutedRibbonCommandDelegator
      x:Key="MaximumPriceCommand"       
      LabelTitle="Maximum Price"
      ToolTipDescription="Choose the upper price limit."
      ToolTipTitle="Maximum Price"
      SmallImageSource="{DynamicResource PriceIconDark}"
      LargeImageSource="{DynamicResource PriceIconDark}" 
      ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.SearchResultsCommand}"/>
    <view:NonRoutedRibbonCommandDelegator 
      x:Key="MinimumPriceCommand"
      LabelTitle="Minimum Price"
      ToolTipDescription="Choose the lower price limit."
      ToolTipTitle="Minimum Price"
      SmallImageSource="{StaticResource PriceIconDark}"
      LargeImageSource="{StaticResource PriceIconDark}" 
      ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.SearchResultsCommand}"/>
                
    <r:RibbonCommand  x:Key="BedroomCountCommand"      
      LabelTitle="Bedrooms"
      ToolTipDescription="Indicate the minimum number of bedrooms."
      ToolTipTitle="Bedroom Count"
      SmallImageSource="{StaticResource BedIconDark}"
      LargeImageSource="{StaticResource BedIconDark}"  />
                
                <!--ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.SearchResultsCommand}"/>-->
     
                
    <r:RibbonCommand
      x:Key="BathroomCountCommand"
      LabelTitle="Bathrooms"
      ToolTipDescription="Indicate the minimum number of bathrooms."
      ToolTipTitle="Bathroom Count"
      SmallImageSource="{StaticResource BathIconDark}"
      LargeImageSource="{StaticResource BathIconDark}" 
       />
                <r:RibbonCommand
      x:Key="YearCommand"
	  LabelTitle="Year Built"
      ToolTipDescription="Indicate the earliest construction year for the home."
      ToolTipTitle="Year Built"
      SmallImageSource="{StaticResource YearIconDark}"
      LargeImageSource="{StaticResource YearIconDark}" /> 
                <!--ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.SearchResultsCommand}"/>-->
                <view:NonRoutedRibbonCommandDelegator 
      x:Key="NewConstructionCommand"
       LabelTitle="New Construction"
      ToolTipDescription="Only consider new construction."
      ToolTipTitle="New Construction"
      SmallImageSource="{StaticResource NewConstructionIconDark}"
      LargeImageSource="{StaticResource NewConstructionIconDark}" 
        ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.SearchResultsCommand}"/>
                <view:NonRoutedRibbonCommandDelegator 
      x:Key="HighGrowthCommand"
      LabelTitle="High Growth"
      ToolTipDescription="Only include homes in neighborhoods that historically have a high degree of growth."
      ToolTipTitle="High Growth Neighborhood"
      SmallImageSource="{StaticResource HighGrowthIconDark}"
      LargeImageSource="{StaticResource HighGrowthIconDark}" 
      ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.SearchResultsCommand}"/>
      <view:NonRoutedRibbonCommandDelegator 
      x:Key="NearCityCenterCommand"
      LabelTitle="Near City"
      ToolTipDescription="Only include homes in neighborhoods that are near a city center."
      ToolTipTitle="Near City Center"
      SmallImageSource="{StaticResource CityCenterIconDark}"
      LargeImageSource="{StaticResource CityCenterIconDark}" 
        ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.SearchResultsCommand}"/>
                <view:NonRoutedRibbonCommandDelegator 
      x:Key="NearDiningCommand"
      LabelTitle="Near Dining"
      ToolTipDescription="Only include homes in neighborhoods that are near restaurants and dining."
      ToolTipTitle="Near Restaurants and Dining"
      SmallImageSource="{StaticResource DiningIconDark}"
      LargeImageSource="{StaticResource DiningIconDark}" 
     ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.SearchResultsCommand}"/>
                <view:NonRoutedRibbonCommandDelegator 
      x:Key="NearShoppingCommand"
      LabelTitle="Near Shopping"
      ToolTipDescription="Only include homes in neighborhoods that are near shopping areas."
      ToolTipTitle="Near Shipping"
      SmallImageSource="{StaticResource ShoppingIconDark}"
      LargeImageSource="{StaticResource ShoppingIconDark}"
      ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.SearchResultsCommand}"/>
                <view:NonRoutedRibbonCommandDelegator  
      x:Key="RecCenterCommand"
      LabelTitle="Community Center"
      ToolTipDescription="Only include homes in neighborhoods that are near a community or recreation center."
      ToolTipTitle="Near Community Center"
      SmallImageSource="{StaticResource CommunityCenterIconDark}"
      LargeImageSource="{StaticResource CommunityCenterIconDark}" 
      ActualCommand="{Binding  Source={StaticResource spy},Path=DataContext.SearchResultsCommand}"/>
                <!-- end -->



            </r:Ribbon.Resources>
                <r:Ribbon.ApplicationMenu>
        <r:RibbonApplicationMenu Command="{StaticResource ApplicationButton}">
            <r:RibbonApplicationMenu.RecentItemList>
                        <ugly:MoreRecentHighLightListWCommand ItemsSource="{Binding MostRecentFiles}" 
                    Command="{Binding OpenProfile}" DisplayMemberPath="Name"/> 
                    
            </r:RibbonApplicationMenu.RecentItemList>
            <r:RibbonApplicationMenuItem Command="{StaticResource NewProfileCommand}" />
            <r:RibbonApplicationSplitMenuItem Command="{StaticResource SaveCommand}" >
                <r:RibbonApplicationMenuItem Command="{StaticResource SaveCommand}"/>
                <r:RibbonApplicationMenuItem Command="{StaticResource SaveOnlineCommand}"/>
            </r:RibbonApplicationSplitMenuItem>
            <r:RibbonApplicationSplitMenuItem Command="{StaticResource OpenCommand}" >
                <r:RibbonApplicationMenuItem Command="{StaticResource OpenCommand}"/>
                <r:RibbonApplicationMenuItem Command="{StaticResource OpenOnlineCommand}"/>
            </r:RibbonApplicationSplitMenuItem>
            <r:RibbonApplicationMenuItem Command="{StaticResource PrintCommand}" />
            <Separator/>
            <r:RibbonApplicationMenuItem Command="{StaticResource ContactClientCommand}">
                <r:RibbonApplicationMenuItem Command="{StaticResource ContactInfoCommand}"/>
                <r:RibbonApplicationMenuItem Command="{StaticResource Phone1Command}"/>
                <r:RibbonApplicationMenuItem Command="{StaticResource Phone2Command}"/>
                <r:RibbonApplicationMenuItem Command="{StaticResource EmailCommand}"/>
            </r:RibbonApplicationMenuItem>
        </r:RibbonApplicationMenu>
      </r:Ribbon.ApplicationMenu>

      <r:Ribbon.QuickAccessToolBar>
                <r:RibbonQuickAccessToolBar>
                    <r:RibbonToggleButton  r:RibbonQuickAccessToolBar.Placement="InCustomizeMenuAndToolBar">                       
                    <r:RibbonToggleButton.Command>
                             
                            <view:NonRoutedRibbonCommandDelegator                                        
                        LabelTitle="Blue Skin"
                        ToolTipDescription="Load Blue skin"
                        ToolTipTitle="Blue Skin"
                        SmallImageSource="{StaticResource NewProfileIconDark}"
                        LargeImageSource="{StaticResource NewProfileIconDark}" 
                  ActualCommand="{Binding Source={StaticResource spy}, Path=DataContext.SkinToggleCommand}" 
                />
                            
                </r:RibbonToggleButton.Command>

            </r:RibbonToggleButton>

            </r:RibbonQuickAccessToolBar>
      </r:Ribbon.QuickAccessToolBar>

			 
	<r:RibbonTab Name="SearchTab" Label="Search Criteria" view:RibbonTabSelectedBehavior.SelectionChanged="{Binding SearchSelectedCommand}"   
                   GroupSizeReductionOrder="HomeDetails,NeighborhoodDetails,NeighborhoodDetails,MoveDetails,Price,NeighborhoodDetails,HomeDetails,HomeDetails,Price">

        <!-- Price -->

        <r:RibbonGroup Name="Price">
          <r:RibbonGroup.Command>
            <r:RibbonCommand LabelTitle="Price" 
                             SmallImageSource="{StaticResource PriceIconDark}"
                             LargeImageSource="{StaticResource PriceIconDark}" />
          </r:RibbonGroup.Command>
        <r:RibbonButton Command="{StaticResource MaximumPriceCommand}" />
        <r:RibbonButton Command="{StaticResource MinimumPriceCommand}" />
        </r:RibbonGroup>
        
      <!-- Categories -->

                <r:RibbonGroup Name="Categories">
                    <r:RibbonGroup.Command>
                        <r:RibbonCommand LabelTitle="Categories" 
                             SmallImageSource="{StaticResource ViewDetailsIconDark}" />
                    </r:RibbonGroup.Command>
                     <r:RibbonCheckBox Command="{StaticResource ViewTitleColumn}" 
						x:Name="TitleCheckBox" IsChecked="{Binding DataGridColumnsView.ShowTitle, Mode=TwoWay}"/>
                    
                    <!--<r:RibbonCheckBox Command="{StaticResource ViewTitleColumn}" 
						x:Name="TitleCheckBox" IsChecked="{Binding Source={x:Static view:DesignTimeViewModel.DataGridColumnsView}, Path=ShowTitle, Mode=TwoWay}"/>-->
                    
                    <r:RibbonCheckBox Command="{StaticResource ViewPriceColumn}" x:Name="PriceCheckBox" IsChecked="{Binding DataGridColumnsView.ShowPrice, Mode=TwoWay}"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewBedroomsColumn}" x:Name="BedroomsCheckBox" IsChecked="{Binding DataGridColumnsView.ShowBedrooms, Mode=TwoWay}"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewBathroomsColumn}" x:Name="BathroomsCheckBox" IsChecked="{Binding DataGridColumnsView.ShowBathrooms, Mode=TwoWay}"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewPhotoColumn}" x:Name="PhotoCheckBox" IsChecked="{Binding DataGridColumnsView.ShowPhotos, Mode=TwoWay}"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewYearColumn}" x:Name="YearCheckBox" IsChecked="{Binding DataGridColumnsView.ShowYear, Mode=TwoWay}"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewSqrFootageColumn}" x:Name="SqrFootageCheckBox" IsChecked="{Binding DataGridColumnsView.ShowSquareFootage, Mode=TwoWay}"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewAppointmentColumn}" x:Name="AppointmentCheckBox" IsChecked="{Binding DataGridColumnsView.ShowAppointment, Mode=TwoWay}"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewRatingColumn}" x:Name="RatingCheckBox" IsChecked="{Binding DataGridColumnsView.ShowRating, Mode=TwoWay}"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewAddressColumn}" x:Name="AddressCheckBox" IsChecked="{Binding DataGridColumnsView.ShowAddress, Mode=TwoWay}"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewDateListedColumn}" x:Name="DateListedCheckBox" IsChecked="{Binding DataGridColumnsView.ShowDateListed, Mode=TwoWay}"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewDateUpdatedColumn}" x:Name="DateUpdatedCheckBox" IsChecked="{Binding DataGridColumnsView.ShowDateUpdated, Mode=TwoWay}"/>
                </r:RibbonGroup>

                    <!-- Home Details -->

        <r:RibbonGroup Name="HomeDetails">
          <r:RibbonGroup.Command>
            <r:RibbonCommand LabelTitle="Home Details" 
                             SmallImageSource="{StaticResource BedIconDark}"/>
          </r:RibbonGroup.Command>
            

              <r:RibbonDropDownButton Command="{StaticResource BedroomCountCommand}" ItemsSource="{x:Static biz:FilterMetadata.Rooms}" >
                        <r:RibbonDropDownButton.ItemContainerStyle> 
                            <Style TargetType="{x:Type MenuItem}"> 
                                <Setter Property="HeaderStringFormat" Value="{}{0}+" /> 
                                <Setter Property="Header" Value="{Binding}" /> 
                                <Setter Property="Command" Value="{Binding Source={StaticResource spy}, Path=DataContext.FilterChangedCommand}" />
                                <!--MAB CHANGE <Setter Property="CommandParameter" Value="{Binding Path='', Converter={StaticResource FormatConverter}, ConverterParameter={}Bedroom-{0}}" />-->
                                <Setter Property="CommandParameter" Value="{Binding Path='', Converter={StaticResource FormatConverter}, ConverterParameter=Bedroom-\{0\}}" />                                 
                                <Setter Property="Foreground" Value="Black" /> 
                            </Style>                             
                        </r:RibbonDropDownButton.ItemContainerStyle>                   
              </r:RibbonDropDownButton>


                
			<r:RibbonDropDownButton x:Name="troubleshootBathRoom" Command="{StaticResource BathroomCountCommand}" 
                                    ItemsSource="{x:Static biz:FilterMetadata.BathRooms}" >

                        <r:RibbonDropDownButton.ItemContainerStyle>
                            <Style TargetType="{x:Type MenuItem}">
                                <Setter Property="HeaderStringFormat" Value="{}{0}+" />
                                <Setter Property="Header" Value="{Binding}" />
                                <Setter Property="Command" Value="{Binding Source={StaticResource spy}, Path=DataContext.FilterChangedCommand}" />
                                <!--MAB CHANGE <Setter Property="CommandParameter" Value="{Binding Path='', Converter={StaticResource FormatConverter}, ConverterParameter={}Bathroom-{0}}" />-->
                                <Setter Property="CommandParameter" Value="{Binding Path='', Converter={StaticResource FormatConverter}, ConverterParameter=Bathroom-\{0\}}" />
                                <Setter Property="Foreground" Value="Black" />
                            </Style>
                        </r:RibbonDropDownButton.ItemContainerStyle>
                        <!--<MenuItem Header="1" Command="{Binding FilterChangedCommand}" CommandParameter="Bathroom-1" />
				<MenuItem Header="1.5" Command="{Binding FilterChangedCommand}" CommandParameter="Bathroom-1.5" />
				<MenuItem Header="2" Command="{Binding FilterChangedCommand}" CommandParameter="Bathroom-2"/>
				<MenuItem Header="2.5" Command="{Binding FilterChangedCommand}" CommandParameter="Bathroom-2.5"/>
				<MenuItem Header="3" Command="{Binding FilterChangedCommand}" CommandParameter="Bathroom-3"/>
				<MenuItem Header="4" Command="{Binding FilterChangedCommand}" CommandParameter="Bathroom-4"/>
				<MenuItem Header="5+" Command="{Binding FilterChangedCommand}" CommandParameter="Bathroom-5"/>-->
			</r:RibbonDropDownButton>
            <r:RibbonDropDownButton Command="{StaticResource YearCommand}"
				ItemsSource="{x:Static biz:FilterMetadata.YearBuilt}" 
				ItemTemplate="{StaticResource SimpleMenuItemTemplate}"
             >                
            </r:RibbonDropDownButton>
            <r:RibbonToggleButton Command="{StaticResource NewConstructionCommand}" />
        </r:RibbonGroup>

        <!-- Neighborhood Details -->

        <r:RibbonGroup Name="NeighborhoodDetails">
          <r:RibbonGroup.Command>
            <r:RibbonCommand LabelTitle="Neighborhood Details" 
                             SmallImageSource="{StaticResource CityCenterIconDark}"/>
          </r:RibbonGroup.Command>
          <r:RibbonToggleButton Command="{StaticResource HighGrowthCommand}" />
          <r:RibbonToggleButton Command="{StaticResource NearCityCenterCommand}" />
          <r:RibbonToggleButton Command="{StaticResource NearDiningCommand}" />
          <r:RibbonToggleButton Command="{StaticResource NearShoppingCommand}" />
          <r:RibbonToggleButton Command="{StaticResource RecCenterCommand}" />
        </r:RibbonGroup>

        <!-- Move Details -->

        <r:RibbonGroup Name="MoveDetails">
          <r:RibbonGroup.Command>
            <r:RibbonCommand LabelTitle="Move Details" 
                             SmallImageSource="{StaticResource TimeframeIconDark}"/>
          </r:RibbonGroup.Command>
            <r:RibbonGroup.GroupSizeDefinitions>
                <r:RibbonGroupSizeDefinitionCollection>
                    <r:RibbonGroupSizeDefinition>
                        <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
                        <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
                        <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
                        <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
                    </r:RibbonGroupSizeDefinition>
                    <r:RibbonGroupSizeDefinition IsCollapsed="True"/>
                </r:RibbonGroupSizeDefinitionCollection>
            </r:RibbonGroup.GroupSizeDefinitions>
            <r:RibbonToggleButton Command="{StaticResource TimeFrameCommand}" />
            <r:RibbonToggleButton Command="{StaticResource LocalMoveCommand}" />
            <r:RibbonToggleButton Command="{StaticResource ChildrenCommand}" />
            <r:RibbonToggleButton Command="{StaticResource FirstTimeBuyerCommand}" />
        </r:RibbonGroup>

      </r:RibbonTab>
            
      <r:RibbonTab Name="SearchResults" Label="Search Results" view:RibbonTabSelectedBehavior.SelectionChanged="{Binding SearchSelectedCommand}" >

        <!-- View -->

        <r:RibbonGroup>
          <r:RibbonGroup.Command>
            <r:RibbonCommand LabelTitle="Results View" />
          </r:RibbonGroup.Command>
          <r:RibbonToggleButton Command="{StaticResource ViewListCommand}" />
          <r:RibbonToggleButton Command="{StaticResource ViewDetailsCommand}" />
          <r:RibbonToggleButton Command="{StaticResource ViewMapCommand}" />
        </r:RibbonGroup>
        <!-- Clipboard -->
        <r:RibbonGroup>
          <r:RibbonGroup.Command>
            <r:RibbonCommand LabelTitle="Clipboard" />
          </r:RibbonGroup.Command>
          <r:RibbonButton Command="{StaticResource CopyPhotoCommand}" />
          <r:RibbonButton Command="{StaticResource CopyListingCommand}" />
        </r:RibbonGroup>

      </r:RibbonTab>
        
            <!-- ContextualTab -->        
            <r:Ribbon.ContextualTabGroups>
                <r:RibbonContextualTabGroup Name="MapContextualGroup" Label="Map" 
                       IsActive="{Binding IsMapViewActive}">
                    <r:RibbonTab Label="Map Controls" IsSelected="{Binding IsMapViewActive}">
                        <r:RibbonGroup>
                            <r:RibbonGroup.Command>
                                <r:RibbonCommand LabelTitle="Zoom"/>
                            </r:RibbonGroup.Command>
                            <r:RibbonButton Command="{StaticResource ZoomInCommand}"/>
                            <r:RibbonButton Command="{StaticResource ZoomOutCommand}"/>
                        </r:RibbonGroup>
                    </r:RibbonTab>
                </r:RibbonContextualTabGroup>
				<r:RibbonContextualTabGroup Name="ProfileContextualGroup" Label="Client Profile" IsActive="{Binding IsProfileActive}" >
					<r:RibbonTab Name="ClientProfile" Label="Profile" IsSelected="{Binding IsProfileActive}">
							<!-- Profiles -->
							<r:RibbonGroup>
								<r:RibbonGroup.GroupSizeDefinitions>
									<r:RibbonGroupSizeDefinitionCollection>
										<r:RibbonGroupSizeDefinition>
											<r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
											<r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
											<r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
										</r:RibbonGroupSizeDefinition>
										</r:RibbonGroupSizeDefinitionCollection>
								</r:RibbonGroup.GroupSizeDefinitions>
								<r:RibbonButton Command="{StaticResource SaveCommand}" />
								<r:RibbonButton Command="{StaticResource OpenCommand}" />
								<r:RibbonButton Command="{StaticResource PrintCommand}" />
							</r:RibbonGroup>


							<!-- Contact Information -->

							<!--<r:RibbonGroup>
					<r:RibbonGroup.Command>
						<view:RibbonItem LabelTitle="Contact Information" />
					</r:RibbonGroup.Command>
					<r:RibbonGroup.GroupSizeDefinitions>
						<r:RibbonGroupSizeDefinitionCollection>
							<r:RibbonGroupSizeDefinition>
								<r:RibbonControlSizeDefinition ImageSize="Small" IsLabelVisible="True"/>
								<r:RibbonControlSizeDefinition ImageSize="Small" IsLabelVisible="True"/>
								<r:RibbonControlSizeDefinition ImageSize="Small" IsLabelVisible="True"/>
							</r:RibbonGroupSizeDefinition>
						</r:RibbonGroupSizeDefinitionCollection>
					</r:RibbonGroup.GroupSizeDefinitions>
					<r:RibbonTextBox Command="{StaticResource FullNameCommand}" Width="280" />
					<r:RibbonTextBox Command="{StaticResource Phone1Command}" Width="180" />
					<r:RibbonTextBox Command="{StaticResource EmailCommand}" Width="240" />
				</r:RibbonGroup>-->

							<!-- Online Profiles -->

							<r:RibbonGroup>
								<r:RibbonGroup.Command>
                                    <view:NonRoutedRibbonCommandDelegator LabelTitle="Online Profiles" /> 
								</r:RibbonGroup.Command>
								<r:RibbonGroup.GroupSizeDefinitions>
									<r:RibbonGroupSizeDefinitionCollection>
										<r:RibbonGroupSizeDefinition>
											<r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
											<r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
										</r:RibbonGroupSizeDefinition>
									</r:RibbonGroupSizeDefinitionCollection>
								</r:RibbonGroup.GroupSizeDefinitions>
								<r:RibbonButton Command="{StaticResource SaveOnlineCommand}" />
								<r:RibbonButton Command="{StaticResource OpenOnlineCommand}" />
							</r:RibbonGroup>
							</r:RibbonTab>
					</r:RibbonContextualTabGroup>
            </r:Ribbon.ContextualTabGroups>

        </r:Ribbon>
    
    <Image Source="{StaticResource HorizontalLogo}" Stretch="Uniform" Height="22" Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,28,10,0" />

 
	<Grid x:Name="MainContent" Grid.Row="1">
            <view:SearchCriteriaView x:Name="searchView"/> 
        </Grid>		 
	</Grid>
</r:RibbonWindow>
